package gui.edit.utils;

import tuio.components.CheckBoxTouch;
import gui.edit.components.ActorsPanel;
import gui.edit.listeners.ListenerActorsIsolate;


/**
 * @author Charles Perin
 * 29 mars 2011
 * LIMSI - INRIA Rennes
 * charles.perin@free.fr
 *
 */
public class Actor {

	private String name;
	
	private boolean isSelected;
	
	private boolean isIsolated;
	
	private CheckBoxTouch checkBox;
	
	public Actor(String name, ActorsPanel actorsPanel){
		this.setName(name);
		this.isSelected=false;
		this.isIsolated=false;
		this.setCheckBox(new CheckBoxTouch(name));
		checkBox.addActionListener(new ListenerActorsIsolate(this, actorsPanel));
	}
	
	@Override
	public String toString(){
		return "("+this.getName()+", selected:"+this.isSelected()+", isolated:"+isIsolated()+")";
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getName() {
		return name;
	}


	public void setSelected(boolean isSelected) {
		this.isSelected = isSelected;
	}


	public boolean isSelected() {
		return isSelected;
	}


	public void setIsolated(boolean isIsolated) {
		this.isIsolated = isIsolated;
	}


	public boolean isIsolated() {
		return isIsolated;
	}

	public void setCheckBox(CheckBoxTouch checkBox) {
		this.checkBox = checkBox;
	}

	public CheckBoxTouch getCheckBox() {
		return checkBox;
	}
	
}
